﻿@using BestTrader.Cms.Models
@model List<ManagerRole>
@{
    ViewData["Title"] = "用户管理";
    var IsHideCheckPhone = (Boolean)ViewData["IsHideCheckPhone"];
}
@section head {
    <style>
        .uploadContainer {
            visibility: hidden;
        }
    </style>
}
    <form class="layui-form layui-form-pane" style="width:90%;">
        @Html.AntiForgeryToken()
        @Html.Hidden("Id")
        @Html.Hidden("State")
        <div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">登陆用户</label>
            <div class="layui-input-block">
                <input type="text" name="UserName" class="layui-input UserName" placeholder="请输入登录用户" disabled>
            </div>
        </div>
        <div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">所属角色</label>
            <div class="layui-input-block">
                <select name="RoleId" class="RoleId" lay-filter="RoleId" disabled>
                    @foreach (var item in Model)
                    {
                        <option value="@item.Id">@(item.RoleName)</option>
                    }
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">用户昵称</label>
            <div class="layui-input-block">
                <input type="text" name="NickName" class="layui-input NickName" placeholder="请输入用户昵称" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">手机号码</label>
            <div class="layui-input-block">
                @if (IsHideCheckPhone == true)
                {
                    <input type="text" name="Mobile" class="layui-input Mobile" placeholder="请输入手机号码" autocomplete="off" disabled />
                }
                else
                {
                    <input type="text" name="Mobile" class="layui-input Mobile" lay-verify="required|phone" placeholder="请输入手机号码" autocomplete="off" />
                }
            </div>
        </div>
        <div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">邮箱地址</label>
            <div class="layui-input-block">
                <input type="text" name="Email" class="layui-input Email" lay-verify="required|email" placeholder="请输入邮箱地址" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">所属银行</label>
            <div class="layui-input-block">
                <select id="BankType" name="BankType" class="BankType" lay-verify="required">
                    <option value="中国银行">中国银行</option>
                    <option value="中国邮政">中国邮政</option>
                    <option value="农业银行">农业银行</option>
                    <option value="工商银行">工商银行</option>
                    <option value="建设银行">建设银行</option>
                    <option value="民生银行">民生银行</option>
                    <option value="招商银行">招商银行</option>
                    <option value="交通银行">交通银行</option>
                    <option value="光大银行">光大银行</option>
                    <option value="中信银行">中信银行</option>
                    <option value="兴业银行">兴业银行</option>
                    <option value="华夏银行">华夏银行</option>
                    <option value="浦发银行">浦发银行</option>
                    <option value="平安银行">平安银行</option>
                    
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">开卡城市</label>
            <div class="layui-input-inline">
                <select id="BankProvince" name="BankProvince" class="BankProvince" lay-verify="required" lay-filter="bankprovince"></select>
            </div>
            <div class="layui-input-inline">
                <select id="BankCity" name="BankCity" class="BankCity" lay-verify="required"></select>
            </div>
        </div>
        <div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">银行卡号</label>
            <div class="layui-input-block">
                <input type="text" name="BankCard" class="layui-input BankCard" lay-verify="required" placeholder="请输入银行卡号" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">身份证</label>
            <div class="layui-input-block">
                <input type="text" name="CardId" class="layui-input CardId" lay-verify="required" placeholder="请输入身份证" autocomplete="off" />
            </div>
        </div>
        @*<div class="layui-form-item layui-row layui-col-xs12" pane>
            <label class="layui-form-label">是否锁定</label>
            <div class="layui-input-block">
                <input type="checkbox" name="IsLock" class="IsLock" lay-filter="IsLock" lay-skin="switch" lay-text="是|否" disabled />
            </div>
        </div>*@
        <div class="layui-form-item layui-row layui-col-xs12" pane>
            <label class="layui-form-label"><label class="layui-red">*</label>用户资料</label>
            <div class="layui-input-block">
                <div id="imagesPanel" name="imagesPanel" class="imagesPanel"></div>
                <input type="hidden" id="UploadImages" name="UploadImages" class="UploadImages" />
                <button type="button" class="layui-btn  layui-btn-sm" id="uploadImagesBtn">
                    <i class="layui-icon">&#xe67c;</i>上传图片
                </button>
            </div>
        </div>
        <div class="layui-form-item layui-form-text layui-col-xs12">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入备注信息" name="Remark" class="layui-textarea Remark"></textarea>
            </div>
        </div>
        <div id="AuditRemark" class="layui-form-item layui-form-text layui-col-xs12 " style="display:none">
            <label class="layui-form-label layui-bg-red">驳回原因</label>
            <div class="layui-input-block">
                <textarea name="AuditRemark" class="layui-textarea AuditRemark" disabled></textarea>
            </div>
        </div>
        @if (ViewData["IsState"].ToString() != "1")
        {
            <div class="layui-form-item layui-row layui-col-xs12">
                <div class="layui-input-block">
                    <button id="editManager" class="layui-btn editManager" lay-submit="" lay-filter="editManager">确认保存</button>
                    @*<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary">重置</button>*@
                </div>
            </div>

        }
    </form>
<div class="uploadContainer">
    <!-- Document：https://developer.qiniu.com/kodo/manual/form-upload -->
    <form id="testform" method="post" enctype="multipart/form-data">
        <input name="key" id="key" type="hidden" value="">
        <input id="token" name="token" type="hidden" value="@ViewData["QiniuToken"]">
        <input id="userfile" name="file" type="file" accept=".jpg,.png,.jpeg" />
        <input id="userfilepath" name="userfilepath" type="hidden" />
        <input id="userfilename" name="userfilename" value="" type="hidden" />

        <!-- take photo with phone -->
        <!-- <input id="userfile" name="file" accept="image/*" type="file" /> -->
        <!-- take video with phone -->
        <!-- <input id="userfile" name="file" type="file" accept="video/*"/> -->

        <input name="accept" type="hidden" />
    </form>

    <!-- add file -->
    <label for="userfile">
        <span></span>
        <em>添加文件</em>
    </label>

    <!-- upload info -->
    <div class="selected-file"></div>
    <div class="progress"></div>
    <div class="uploaded-result"></div>
</div>

@section Scripts{
    <script type="text/javascript" src="~/layui/layui.js"></script>
    <script type="text/javascript" src="~/js/qiniu/formdata.js"></script>
    <script type="text/javascript" src="~/js/city.js"></script>
    <script type="text/javascript" src="~/js/manager/managerEdit.js?_=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
}



